//
//  RecommendSpecialDiscountCell.m
//  QYer
//
//  Created by lanou on 16/8/5.
//  Copyright © 2016年 CaiZhuYu. All rights reserved.
//

#import "RecommendSpecialDiscountCell.h"

@implementation RecommendSpecialDiscountCell

- (void)setContentWithModel:(RecommendSpecialDiscountModel *)model {
    [self.photoView sd_setImageWithURL:[NSURL URLWithString:model.photo] placeholderImage:[UIImage imageNamed:@"占位图"]];
    self.titleLabel.text = model.title;
    self.priceoffLabel.text = model.priceoff;
    
    //价格:<em>4999</em>元起
    //self.priceLabel.text = model.price;
    NSString *string = @"(>)(\\w+)(<)";
    NSRange range = [model.price rangeOfString:string options:NSRegularExpressionSearch];
    if (range.location != NSNotFound) {
        NSString *priceNumber = [model.price substringWithRange:NSMakeRange(range.location+1, range.length-2)];
        self.priceLabel.text = [NSString stringWithFormat:@"%@元起", priceNumber];
    }
}




- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
